<?php

/**
 * 
 * Form to check the transactions.
 * @author Théo Chamley
 *
 */
class Application_Form_Admin_RechargesForm extends Zend_Form {

	public function init() {
		$this->setName('recharges');
		//$validator = new Zend_Validate_Date();

		$date1 = new Zend_Form_Element_Text('date1');
		$date1->setLabel('Date de début : ')
			->setValue(strftime("%d/%m/%Y", mktime(date('H'), date('i'), date('s'), date('m')-1, date('d'), date('Y'))))
			->setDecorators(array('ViewHelper','FormErrors','Errors','Label'));

		$date2 = new Zend_Form_Element_Text('date2');
		$date2->setLabel('Date de fin : ')
			->setValue(date('d/m/Y'))
			->setDecorators(array('ViewHelper','FormErrors','Errors','Label'));

		$verif = new Zend_Form_Element_Checkbox('verif');
		$verif->setDecorators(array('ViewHelper','FormErrors','Errors','Label'))
			->setValue(0)
			->setLabel('Vérifiées : ');

		$noverif = new Zend_Form_Element_Checkbox('noverif');
		$noverif->setDecorators(array('ViewHelper','FormErrors','Errors','Label'))
			->setValue(1)
			->setLabel('Non vérifiées : ');

		$num_transac = new Zend_Form_Element_Text('num_transac');
		$num_transac->setLabel('Numéro de transaction : ')
			->setValue('')
			->setDecorators(array('ViewHelper','FormErrors','Errors','Label'));

		$send = new Zend_Form_Element_Submit('send');
		$send->setAttrib('id','send_button')
			->setLabel('Recherche')
			->setAttrib('class','button')
			->setDecorators(array('ViewHelper','FormErrors','Errors'));

		$this->addElements(array($date1,$date2,$verif,$noverif,$num_transac,$send));

	}

}